package com.ling.rocketmq.annotation;

import com.ling.rocketmq.configuration.RocketmqProducerAutoConfiguration;
import com.ling.rocketmq.producer.RocketmqProducerScannerRegistrar;
import com.ling.rocketmq.producer.RocketmqScannerConfigurer;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.context.annotation.Import;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import({RocketmqProducerScannerRegistrar.class,
        RocketmqScannerConfigurer.class})
@ImportAutoConfiguration({RocketmqProducerAutoConfiguration.class})
public @interface EnableRocketmqProducer {

    String[] value() default {};

    String[] basePackages() default {};

    Class<?>[] basePackageClasses() default {};
}
